package com.fbli.test.mapper;

import com.fbli.test.entity.Authority;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
@Mapper
public interface AuthorityMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Authority record);

    Authority selectByPrimaryKey(Integer id);

    List<Authority> selectAll();

    int updateByPrimaryKey(Authority record);

    /**
     * 根据用户名查询用户权限
     * @param userId
     * @return
     */
    List<Authority> selectByUserId(@Param("userId") Long userId);
}